﻿using System;
using System.ServiceModel.Activation;
using FU.Capstones.IMS.Services.Common.DataContracts;
using FU.Capstones.IMS.Services.Common.Respondents;
using FU.Capstones.IMS.Services.DataContracts;
using FU.Capstones.IMS.Services.Interfaces;

namespace FU.Capstones.IMS.Services.Management
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class InventoryService : IInventoryService
    {
        private readonly Manager manager = new Manager();

        #region Implementation of IInventoryService

        #region Account

        //public CollectionFeedback<Account> GetAccountCollection(bool isShowAll)
        //{
        //    return manager.GetAccountCollection(isShowAll);
        //}

        //public SingleFeedback<Account> GetSingleAccount(int accountID)
        //{
        //    return manager.GetSingleAccount(accountID);
        //}

        //public SingleFeedback<int> InsertAccount(Account data)
        //{
        //    return manager.InsertAccount(data);
        //}

        //public Feedback UpdateAccount(Account data)
        //{
        //    return manager.UpdateAccount(data);
        //}

        //public Feedback DeleteAccount(int data)
        //{
        //    return manager.DeleteAccount(data);
        //}

        //public Feedback UndoDeleteAccount(int data)
        //{
        //    return manager.UndoDeleteAccount(data);
        //}

        //public CollectionFeedback<Account> SearchAccount(Account criteria)
        //{
        //    return manager.SearchAccount(criteria);
        //}

        public SingleFeedback<Account> Login(Account account)
        {
            return manager.Login(account);
        }

        public Feedback CheckIfUsernameExists(string usernameToCheck)
        {
            return manager.CheckIfUsernameExists(usernameToCheck);
        }

        public Feedback ResetPassword(Account account)
        {
            return manager.ResetPassword(account);
        }

        public Feedback ChangePassword(NewPasswordData account)
        {
            return manager.ChangePassword(account);
        }

        #endregion

        #region Authorization

        public CollectionFeedback<Authorization> GetAuthorizationCollection(bool isShowAll)
        {
            return manager.GetAuthorizationCollection(isShowAll);
        }

        public SingleFeedback<Authorization> GetSingleAuthorization(int objectID)
        {
            return manager.GetSingleAuthorization(objectID);
        }

        public SingleFeedback<int> InsertAuthorization(Authorization data)
        {
            return manager.InsertAuthorization(data);
        }

        public Feedback UpdateAuthorization(Authorization data)
        {
            return manager.UpdateAuthorization(data);
        }

        public Feedback DeleteAuthorization(int data)
        {
            return manager.DeleteAuthorization(data);
        }

        public CollectionFeedback<Authorization> SearchAuthorization(Authorization criteria)
        {
            return manager.SearchAuthorization(criteria);
        }

        #endregion

        #region Contact

        public CollectionFeedback<Contact> GetContactCollection(bool isShowAll)
        {
            return manager.GetContactCollection(isShowAll);
        }

        public SingleFeedback<Contact> GetSingleContact(int contactID)
        {
            return manager.GetSingleContact(contactID);
        }

        public SingleFeedback<int> InsertContact(Contact data)
        {
            return manager.InsertContact(data);
        }

        public Feedback UpdateContact(Contact data)
        {
            return manager.UpdateContact(data);
        }

        public Feedback DeleteContact(int data)
        {
            return manager.DeleteContact(data);
        }

        public CollectionFeedback<Contact> SearchContact(Contact criteria)
        {
            return manager.SearchContact(criteria);
        }

        public Feedback UndoDeleteContact(int data)
        {
            return manager.UndoDeleteContact(data);
        }

        #endregion

        #region Employee

        public CollectionFeedback<Employee> GetEmployeeCollection(bool isShowAll)
        {
            return manager.GetEmployeeCollection(isShowAll);
        }

        public SingleFeedback<Employee> GetSingleEmployee(int objectID)
        {
            return manager.GetSingleEmployee(objectID);
        }

        public SingleFeedback<int> InsertEmployee(Employee data)
        {
            return manager.InsertEmployee(data);
        }

        public Feedback UpdateEmployee(Employee data)
        {
            return manager.UpdateEmployee(data);
        }

        public Feedback DeleteEmployee(int data)
        {
            return manager.DeleteEmployee(data);
        }

        public CollectionFeedback<Employee> SearchEmployee(EmployeeCriteria criteria)
        {
            return manager.SearchEmployee(criteria);
        }

        public Feedback UndoDeleteEmployee(int data)
        {
            return manager.UndoDeleteEmployee(data);
        }

        #endregion

        #region EmploymentType

        public CollectionFeedback<EmploymentType> GetEmploymentTypeCollection(bool isShowAll)
        {
            return manager.GetEmploymentTypeCollection(isShowAll);
        }

        public SingleFeedback<EmploymentType> GetSingleEmploymentType(int employmentTypeID)
        {
            return manager.GetSingleEmploymentType(employmentTypeID);
        }

        public SingleFeedback<int> InsertEmploymentType(EmploymentType data)
        {
            return manager.InsertEmploymentType(data);
        }

        public Feedback UpdateEmploymentType(EmploymentType data)
        {
            return manager.UpdateEmploymentType(data);
        }

        public Feedback DeleteEmploymentType(int data)
        {
            return manager.DeleteEmploymentType(data);
        }

        public CollectionFeedback<EmploymentType> SearchEmploymentType(EmploymentType criteria)
        {
            return manager.SearchEmploymentType(criteria);
        }

        public Feedback UndoDeleteEmploymentType(int data)
        {
            return manager.UndoDeleteEmploymentType(data);
        }

        #endregion

        #region Material

        public CollectionFeedback<Material> GetMaterialCollection(bool isShowAll)
        {
            return manager.GetMaterialCollection(isShowAll);
        }

        public CollectionFeedback<Material> GetMaterialCollectionType(bool isShowAll)
        {
            return manager.GetMaterialCollectionType(isShowAll);
        }

        public SingleFeedback<Material> GetSingleMaterial(int materialID)
        {
            return manager.GetSingleMaterial(materialID);
        }

        public SingleFeedback<int> InsertMaterial(Material data)
        {
            return manager.InsertMaterial(data);
        }

        public Feedback UpdateMaterial(Material data)
        {
            return manager.UpdateMaterial(data);
        }

        public Feedback DeleteMaterial(int data)
        {
            return manager.DeleteMaterial(data);
        }

        public CollectionFeedback<Material> SearchMaterial(MaterialCriteria criteria)
        {
            return manager.SearchMaterial(criteria);
        }

        public Feedback UndoDeleteMaterial(int data)
        {
            return manager.UndoDeleteMaterial(data);
        }

        #endregion

        #region Order

        public CollectionFeedback<Order> GetOrderCollection(bool isShowAll)
        {
            return manager.GetOrderCollection(isShowAll);
        }
        public CollectionFeedback<Order> GetOrderCollectionByParameter(bool? isMaterial)
         {
             return manager.GetOrderCollectionByParameter(isMaterial);
         }

        public SingleFeedback<Order> GetSingleOrder(int orderID)
        {
            return manager.GetSingleOrder(orderID);
        }

        public SingleFeedback<int> InsertOrder(Order data)
        {
            return manager.InsertOrder(data);
        }

        public Feedback UpdateOrder(Order data)
        {
            return manager.UpdateOrder(data);
        }

        public Feedback DeleteOrder(int data)
        {
            return manager.DeleteOrder(data);
        }

        public CollectionFeedback<Order> SearchOrder(OrderCriteria criteria)
        {
            return manager.SearchOrder(criteria);
        }

        public Feedback UndoDeleteOrder(int data)
        {
            return manager.UndoDeleteOrder(data);
        }

        #endregion

        #region Partner

        public CollectionFeedback<Partner> GetPartnerCollection(bool isShowAll)
        {
            return manager.GetPartnerCollection(isShowAll);
        }

        public CollectionFeedback<Partner> GetPartnerCollectionByParam(bool? isSupplier)
        {
            return manager.GetPartnerCollectionByParam(isSupplier);
        }

        public SingleFeedback<Partner> GetSinglePartner(int partnerID)
        {
            return manager.GetSinglePartner(partnerID);
        }

        public SingleFeedback<int> InsertPartner(Partner data)
        {
            return manager.InsertPartner(data);
        }

        public Feedback UpdatePartner(Partner data)
        {
            return manager.UpdatePartner(data);
        }

        public Feedback DeletePartner(int data)
        {
            return manager.DeletePartner(data);
        }

        public CollectionFeedback<Partner> SearchPartner(Partner criteria)
        {
            return manager.SearchPartner(criteria);
        }

        public Feedback UndoDeletePartner(int data)
        {
            return manager.UndoDeletePartner(data);
        }

        #endregion

        #region Product

        public CollectionFeedback<Product> GetProductCollection(bool isShowAll)
        {
            return manager.GetProductCollection(isShowAll);
        }

        public CollectionFeedback<Product> GetProductCollectionType(bool isShowAll)
        {
            return manager.GetProductCollectionType(isShowAll);
        }

        public SingleFeedback<Product> GetSingleProduct(int productID)
        {
            return manager.GetSingleProduct(productID);
        }

        public SingleFeedback<int> InsertProduct(Product data)
        {
            return manager.InsertProduct(data);
        }

        public Feedback InsertBuiltupMaterial(int pID, int mID, long mQuantity)
        {
            return manager.InsertBuiltupMaterial(pID, mID, mQuantity);
        }

        public Feedback UpdateProduct(Product data)
        {
            return manager.UpdateProduct(data);
        }

        public Feedback DeleteProduct(int data)
        {
            return manager.DeleteProduct(data);
        }

        public Feedback DeleteProductBuiltup(int pID, int mID)
        {
            return manager.DeleteBuiltup(pID, mID);
        }

        public CollectionFeedback<Product> SearchProduct(ProductCriteria criteria)
        {
            return manager.SearchProduct(criteria);
        }

        public Feedback UndoDeleteProduct(int data)
        {
            return manager.UndoDeleteProduct(data);
        }

        #endregion

        #region Role

        public CollectionFeedback<Role> GetRoleCollection(bool isShowAll)
        {
            return manager.GetRoleCollection(isShowAll);
        }

        public SingleFeedback<Role> GetSingleRole(int roleID)
        {
            return manager.GetSingleRole(roleID);
        }

        public SingleFeedback<int> InsertRole(Role data)
        {
            return manager.InsertRole(data);
        }

        public Feedback UpdateRole(Role data)
        {
            return manager.UpdateRole(data);
        }

        public Feedback DeleteRole(int data)
        {
            return manager.DeleteRole(data);
        }

        public CollectionFeedback<Role> SearchRole(Role criteria)
        {
            return manager.SearchRole(criteria);
        }

        public Feedback UndoDeleteRole(int data)
        {
            return manager.UndoDeleteRole(data);
        }

        #endregion

        #region Warehouse

        public CollectionFeedback<Warehouse> GetWarehouseCollection(bool isShowAll)
        {
            return manager.GetWarehouseCollection(isShowAll);
        }

        public SingleFeedback<Warehouse> GetSingleWarehouse(int warehouseID)
        {
            return manager.GetSingleWarehouse(warehouseID);
        }

        public SingleFeedback<int> InsertWarehouse(Warehouse data)
        {
            return manager.InsertWarehouse(data);
        }

        public Feedback UpdateWarehouse(Warehouse data)
        {
            return manager.UpdateWarehouse(data);
        }

        public Feedback DeleteWarehouse(int data)
        {
            return manager.DeleteWarehouse(data);
        }

        public CollectionFeedback<Warehouse> SearchWarehouse(Warehouse criteria)
        {
            return manager.SearchWarehouse(criteria);
        }

        public Feedback UndoDeleteWarehouse(int data)
        {
            return manager.UndoDeleteWarehouse(data);
        }

        #endregion

        #region MaterialLoaf

        public CollectionFeedback<MaterialLoaf> GetMaterialLoafCollection(bool isShowAll)
        {
            return manager.GetMaterialLoafCollection(isShowAll);
        }

        public SingleFeedback<MaterialLoaf> GetSingleMaterialLoaf(int materialID)
        {
            return manager.GetSingleMaterialLoaf(materialID);
        }

        public SingleFeedback<int> InsertMaterialLoaf(MaterialLoaf data)
        {
            return manager.InsertMaterialLoaf(data);
        }

        public Feedback UpdateMaterialLoaf(MaterialLoaf data)
        {
            return manager.UpdateMaterialLoaf(data);
        }

        
        public Feedback DeleteMaterialLoaf(int data)
        {
            return manager.DeleteMaterialLoaf(data);
        }

        public CollectionFeedback<MaterialLoaf> SearchMaterialLoaf(MaterialLoaf criteria)
        {
            return manager.SearchMaterialLoaf(criteria);
        }

        public Feedback UndoDeleteMaterialLoaf(int data)
        {
            return manager.UndoDeleteMaterialLoaf(data);
        }

        #endregion
        #endregion
    }
}
